import '../model/chat_msg_model.dart';

class ChatMsgManager {
  static final ChatMsgManager _instance = ChatMsgManager._internal();

  factory ChatMsgManager() {
    return _instance;
  }

  ChatMsgManager._internal();

  void doSomething() {
    print("Doing something...");
  }

  //测试数据
  late final List<ChatMsgModel> _gloYandexlist = [];
  List<ChatMsgModel> getYandexList() {
    _gloYandexlist.add(ChatMsgModel(
        id: 0,
        content: "纹身问答APP",
        ownerType: OwnerType.receiver,
        createdAt: 1696142391000,
        ownerName: "ChatGPT"));

    _gloYandexlist.add(ChatMsgModel(
        id: 1,
        content: "介绍下机器人App",
        ownerType: OwnerType.sender,
        createdAt: 1696142392000,
        ownerName: "Jack"));

    _gloYandexlist.add(ChatMsgModel(
        id: 2,
        content: "为什么学生喜欢树？因为树有树叶，而“树叶”听起来像“输了”！所以他们可以说：“我不是失败了，我只是树了",
        ownerType: OwnerType.receiver,
        createdAt: 1696142393000,
        ownerName: "ChatGPT"));

    _gloYandexlist.add(ChatMsgModel(
        id: 3,
        content: "讲一个笑话",
        ownerType: OwnerType.sender,
        createdAt: 1696142392000,
        ownerName: "Jack"));

    _gloYandexlist.add(ChatMsgModel(
        id: 4,
        content: "你好有什么可以帮助你...",
        ownerType: OwnerType.receiver,
        createdAt: 1696142392000 - 1000000,
        ownerName: "ChatGPT"));

    return _gloYandexlist;
  }
}
